<?php defined('SYSPATH') or die('No direct script access.') ?>

<div class="row">
	<div class="col-lg-6 col-md-6"><h4>Список доп. полей</h4></div>
    <div class="col-lg-6 col-md-6"><h4>Новые доп. поля</h4></div>
</div>
<div class="row">
<?php echo Form::open($controller.'/'.$action.'/short', array('id'=>'additional_form','class'=>'form-inline','role'=>'form')) ?>
    <ul id="sortable1" class="connectedSortable col-lg-6 col-md-6">
<?php
foreach($additional as &$row)
{
?>
		<li class="ui-state-default">
            <div class="row">
                <div class="col-lg-2">
                    <span class="glyphicon glyphicon-move"></span>
                </div>
                <div class="col-lg-10">
                    <?php echo Form::input('additional[]', $row['additionaltext'], array('class'=>'form-control','placeholder'=>'Дополнительная информация')) ?>
                </div>
            </div>
        </li>
<?php
}
?>
    </ul>

    <ul id="sortable3" class="connectedSortable col-lg-6 col-md-6">

    </ul>

    <div class="row">
        <div class="col-lg-offset-4 col-lg-4">
            <button id="additional_add" type="button" class="btn btn-default btn-block">Добавить строку</button>
            <button id="additional_submit" type="button" class="btn btn-primary btn-block">Сохранить изменения</button>
        </div>

    </div>
</form>

</div>

<div id="additional_line" class="row hidden">
    <div class="col-lg-1">
        <span class="glyphicon glyphicon-move"></span>
    </div>
    <div class="col-lg-11">
        <?php echo Form::input('additional[]', '', array('class'=>'form-control','placeholder'=>'дополнительная информация')) ?>
    </div>
</div>
